/**
 * Copyright 2011 Joe Choi, All rights reserved.
 */
package tao.calendar.gregorian;

import tao.time.Time;

/**
 * The GrogorianDate represents the date of Gregorian calendar system. That is one year has 12 months
 * one month has days depend on the rules described as below:
 * <ul>
 * <li> 1 - 31 for long month </li>
 * <li> 1 - 30 for short month </li>
 * <li> 28 for February of an non-leap year </li>
 * <li> 29 for February of a leap year </li>
 * </ul>
 * 
 * <b>Scalar</b><br>
 * The implements of this interface translates the date into scalar value in millisecond which is
 * equivalent to the date. The epoch that is 1970-1-1 0:0:0.0 is zero millisecond and the date before 
 * the epoch evaluated as negative and that after the epoch evaluated as positive
 * <br><br>
 *  
 * <b> Era </b><br>
 * There is no year 0 in Gregorian calendar system, so zero year evaluated as last year of B.C.
 * i.e. 1 B.C. and -1 to 2 B.C. and so on. Such interpretation does not concise to java.util.Calendar
 * class. it will inverse the ERA field when the value of year is less or equal to zero. It is quite
 * confused, and so we don't adopt it here. <br>
 * For the implementation of GregorianDate, the value of year less or equal to zero always evaluated to 
 * the B.C. and positive value of year always evaluated to A.D.
 * <br><br>
 * 
 * <b> Limit </b><br>
 * The invalid value of year is -1,000,000 - +1,000,000.
 * 
 * @author Joe Choi
 * @version 1.0.0
 */
public interface GregorianDate extends Time  {
	public int getYear();
	public int getMonth();
	public int getDay();
	public Era getEra();
	
	/**
	 * The Era of Gregorian calendar system
	 * 
	 * @author Joe Choi
	 * @version 1.0.0
	 */
	public enum Era { BC, AD };	
}
